﻿<%@ Control Language="C#" AutoEventWireup="true" Inherits="NopSolutions.NopCommerce.Web.Modules.CustomerInfoControl"
    CodeBehind="CustomerInfo.ascx.cs" %>
<%@ Register TagPrefix="nopCommerce" TagName="EmailTextBox" Src="~/Modules/EmailTextBox.ascx" %>
<div class="customer-info-box">
    <div class="message-error">
        <asp:Literal ID="ErrorMessage" runat="server" EnableViewState="False"></asp:Literal>
        <br />
    </div>
    <div class="clear">
    </div>
    <table class="reg_table_container" cellpadding="0" cellspacing="0">
          <tbody>
            <tr>
              <td colspan="2"><span class="red1"><strong>*</strong></span><strong> - Обязательные поля</strong></td>
            </tr>
            <tr>
              <td colspan="2">&nbsp;</td>
            </tr>
            <tr>
              <td class="item_name">Имя пользователя<span class="red1"><strong>*</strong></span></td>
              <td class="item_value">
                <asp:TextBox ID="txtFirstName" runat="server" MaxLength="40" CssClass="reg_textbox"></asp:TextBox>
              </td>
            </tr>
            <tr>
              <td>&nbsp;</td>
            <td>
              <asp:RequiredFieldValidator ID="rfvFirstName" runat="server" ControlToValidate="txtFirstName" Display="Dynamic"
                  ErrorMessage="<% $NopResources:Account.FirstNameIsRequired %>" ToolTip="<% $NopResources:Account.FirstNameIsRequired %>"
                  ValidationGroup="CustomerInfo"> </asp:RequiredFieldValidator>
            </td>
            </tr>
            <%--this table row is used to get an username when customers are authenticated by usernames--%>
            <%--this table row is used to get an email when customers are authenticated by emails--%>
            <tr>
              <td class="item_name">E-mail<span class="red1"><strong>*</strong></span></td>
              <td class="item_value">
                <asp:TextBox ID="UserName" runat="server" MaxLength="100" CssClass="reg_textbox"></asp:TextBox>
              </td>
            </tr>
            <tr>
              <td>&nbsp;</td>
              <td>
                <asp:RequiredFieldValidator ID="UserNameOrEmailRequired" runat="server" ControlToValidate="UserName"
                  ErrorMessage="Username is required" ToolTip="Username is required" Display="Dynamic"
                  ValidationGroup="CustomerInfo"></asp:RequiredFieldValidator>
                <asp:RegularExpressionValidator runat="server" ID="refUserNameOrEmail" Display="Dynamic"
                  ControlToValidate="UserName" ErrorMessage="Invalid email" ToolTip="Invalid email"
                  ValidationExpression="[\w\.-]+(\+[\w-]*)?@([\w-]+\.)+[\w-]+" ValidationGroup="CustomerInfo"></asp:RegularExpressionValidator>
              </td>
            </tr>
            <tr>
              <td class="item_name">Телефон<span class="red1"><strong>*</strong></span></td>
              <td class="item_value"><asp:TextBox ID="txtPhoneNumber" runat="server" CssClass="reg_textbox"></asp:TextBox></td>
            </tr>
            <tr>
              <td>&nbsp;</td>
              <td>
                <asp:RequiredFieldValidator ID="rfvPhoneNumber" runat="server" ControlToValidate="txtPhoneNumber" Display="Dynamic"
                  ErrorMessage="<% $NopResources:Account.PhoneNumberIsRequired %>" ToolTip="<% $NopResources:Account.PhoneNumberIsRequired %>"
                  ValidationGroup="CustomerInfo"></asp:RequiredFieldValidator>
              </td>
            </tr>
            <tr>
              <td class="item_name">
                Название организации:
              </td>
              <td class="item_value">
                <asp:TextBox ID="txtCompany" runat="server" CssClass="reg_textbox"></asp:TextBox>
              </td>
            </tr>
            <tr>
              <td colspan="2">
                <table class="reg_table_container" cellpadding="2" cellspacing="0">
                <tbody>
                  <tr>
                    <td width="5%">
                      <asp:CheckBox ID="cbNotifiedSMSAboutOrder" runat="server" Checked="true"></asp:CheckBox>
                    </td>
                    <td width="95%">Получать (СМС) оповещения о состоянии заказа</td>
                  </tr>
                </tbody>
                </table>
              </td>
            </tr>
            <tr>
              <td colspan="2">&nbsp;</td>
            </tr>
            <tr>
              <td colspan="2">
                <table class="reg_table_container" cellpadding="2" cellspacing="0">
                <tbody>
                  <tr>
                    <td width="5%">
                      <asp:CheckBox ID="cbNewsletter" runat="server" Checked="true"></asp:CheckBox>
                    </td>
                    <td width="95%">
                      <%=GetLocaleResourceString("Account.Newsletter")%>
                    </td>
                  </tr>
                </tbody>
                </table>
              </td>
            </tr>
            <tr>
              <td colspan="2"><span class="red2">Ваши личные данные не будут переданы третьим лицам и будут использованы в пределах этого сайта</span></td>
            </tr>
            <tr>
              <td colspan="2" align="right">
                <asp:Button runat="server" ID="btnSaveCustomerInfo" Text="" ValidationGroup="CustomerInfo" OnClick="btnSaveCustomerInfo_Click" CssClass="savecustomerinfobutton">
                </asp:Button>
              </td>
            </tr>
          </tbody>
    </table>
    <div class="clear">
    </div>
</div>
